<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<style type="text/css">
			*{
				list-style: none;
				float: left;
			}
			h2{
				margin-left: 10px;
				width: 150px;
				height: 30px;
				text-align: center;
			}
			img{
				width: 550px;
				height: 550px;
			}
		</style>
	</head>
	<body>
		<div id="app">
			<h2 @click="b1">第一张图片</h2>
			<h2 @click="b2">第二张图片</h2>
			<h2 @click="b3">第三张图片</h2><br>
			<img :src="a1" >
		</div>
		<script src="vue.js" type="text/javascript" charset="utf-8"></script>
		<script type="text/javascript">
			var app = new Vue({
				el:"#app",
				data:{
					a1:"1.jpg"
				},
				methods:{
					b1(){
						this.a1="1.jpg"
					},
					b2(){
						this.a1="2.jpg"
					},
					b3(){
						this.a1="3.jpg"
					}
				}
			})
		</script>
	</body>
</html>
